package shapes.shapes2D
{
	import flash.display.Graphics;
	import flash.geom.Point;
	
	/**
	 * @author Nicolas Barradeau
	 * http://en.nicoptere.net
	 */
	public class Triangle extends BaseShape
	{
		
		private var _d0:Point;
		private var _d1:Point;
		private var _d2:Point;
		
		private var _lines:Vector.<Line>;
		
		public function Triangle( d0:Point = null, d1:Point = null, d2:Point = null ) 
		{
			
			_d0 = d0;
			_d1 = d1;
			_d2 = d2;
			
		}
		
		public function get d0():Point { return _d0; }
		
		public function set d0(value:Point):void 
		{
			_d0 = value;
		}
		
		public function get d1():Point { return _d1; }
		
		public function set d1(value:Point):void 
		{
			_d1 = value;
		}
		
		public function get d2():Point { return _d2; }
		
		public function set d2(value:Point):void 
		{
			_d2 = value;
		}
		
		public function draw( graphics:Graphics = null ):void 
		{ 
			
			graphics.moveTo( d0.x, d0.y );
			graphics.lineTo( d1.x, d1.y );
			graphics.lineTo( d2.x, d2.y );
			graphics.lineTo( d0.x, d0.y );
			
		}
		
	}

}